package com.cskaoyan.javase.oop1._7game._0lol;

/**
 * 用面向对象的思想模拟LOL当中盖伦的战斗
 * 对象是: 盖伦(galen)这个英雄对象
 * 类: 英雄类(Legend)
 *
 * @since 10:55
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        Legend galen = new Legend("galen", 1000, 0, "沉默", "开个护盾", "爱的魔力转圈圈", "大宝剑");
        galen.fight();
    }
}

class Legend {

    /*
        在目前,类中结构的定义已经存在三种结构了:
            1.成员变量
            2.成员方法
            3.构造器
        这三种结构,应该先定义成员变量,再定义构造器,把成员方法放在最后面
     */
    String name;
    int hp;
    int mp;
    String skillQ;
    String skillW;
    String skillE;
    String skillR;

    // 构造器
    public Legend() {
    }

    public Legend(String name, int hp, int mp, String skillQ, String skillW, String skillE) {
        this.name = name;
        this.hp = hp;
        this.mp = mp;
        this.skillQ = skillQ;
        this.skillW = skillW;
        this.skillE = skillE;
    }

    public Legend(String name, int hp, int mp, String skillQ, String skillW, String skillE, String skillR) {
        this(name, hp, mp, skillQ, skillW, skillE);
        this.skillR = skillR;
    }

    // 行为
    public void fight() {
        System.out.println(name + "正在释放大招" + skillR);
    }
}